//
//  MyRequest.h
//  baodongPro
//
//  Created by feng on 16/3/4.
//  Copyright © 2016年 proper. All rights reserved.
//
typedef void(^successedBlock) (id result);                 // 成功block
typedef void(^failedBlock)(id result);                     // 失败block
typedef void(^percentageBlock)(float percentage);   // 百分比block

#import <Foundation/Foundation.h>

@interface MyRequest : NSObject
/**
 *      @author 冯宝东
 *
 *      单例的封装
 *
 *      @return 网络工具类的实例
 */
+(instancetype)defultTool;
/**
 *      @author 冯宝东
 *
 *      配置请求头
 *
 *      @param dic 请求头的信息
 */
+(void)setRequestManagerHeade:(NSMutableDictionary*)dic;


/**
 *      @author 冯宝东
 *
 *      GET 请求方法
 *
 *      @param GetURL        url HostUrl
 *      @param paramDic      参数
 *      @param mySuccess     成功回调
 *      @param myFailedBlock 失败回调
 */

-(void)getRequestWithURL:(NSString*)GetURL withParameterDic:(NSMutableDictionary*)paramDic withSuccessed:(successedBlock)mySuccess withFailedBclock:(failedBlock)myFailedBlock withPerBlock:(percentageBlock)myPerBlock;

/**
 *      @author 冯宝东
 *
 *      POST  请求方法
 *
 *      @param PostURL       post  HostUrl
 *      @param paramDic      参数
 *      @param mySuccess     成功回调
 *      @param myFailedBlock 失败回调
 */
-(void)postRequestWithURL:(NSString*)PostURL withParameterDic:(NSMutableDictionary*)paramDic withSuccessed:(successedBlock)mySuccess withFailedBclock:(failedBlock)myFailedBlock withPerBlock:(percentageBlock)myPerBlock;




@end
